﻿#region Copyright (C) Sector7 Software Studio. All rights reserved
/*******************************************************************************************
 * Creation
 *      Author:         Wolf Lai
 *      Date:           2013/5/4 星期六 16:14:57
 *      Version:        
 * Modification 
 *      Author: 
 *      Date: 
 *      Description: 
 *      Version:
 *******************************************************************************************/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Windows.Controls;
using System.Windows.Threading;

namespace Sector7.Framework.Utility
{
    /// <summary>
    /// 后台线程工具类
    /// </summary>
    public class BackgroundWorkerUtil
    {
        #region Public functions
        /// <summary>
        /// 获取后台线程实例
        /// </summary>
        /// <param name="host">宿主容器</param>
        /// <returns>后台线程</returns>
        public static BackgroundWorker GetWorker(ContentControl host)
        {
            BackgroundWorker worker = new BackgroundWorker();
            worker = new BackgroundWorker();
            worker.WorkerReportsProgress = true;
            worker.WorkerSupportsCancellation = true;
            
            return worker;
        }
        #endregion

        #region Variables

        #endregion
    }
}
